<template>
	<view class="body">
		<view class="title">
			恭喜 {{name}} 选课成功，请在第二个工作日的下午 4 点钟 之前到学校进行缴费
			<br/>缴费地点: 湘西州老干部大学
			<br/>选课日期：{{time}}
			<br/>咨询电话: 0743-8226214
		</view>
		<view>
			<view class="qc" id="qrcode"></view>
		</view>
	</view>
</template>

<script>
	import { generateQRCode } from "../../util/qrcode.js"
	export default {
		data() {
			return {
				str: '',//核销地址
				name:'',//用户姓名
				time:'',//最后的选课时间
			}
		},
		onLoad(e) {
			this.str = e.str
			this.name = e.username
			this.time = uni.getStorageSync('outTime')
		},
		mounted(){
			this.qccode()
		},
		methods: {
			qccode() {
				generateQRCode(this.str, 'qrcode', 150, 150);
			}
		}
	}
</script>

<style lang="scss" scoped>
	.body {
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
		.title{
			margin:40rpx 0;
			width: 90%;
			font-size: 36rpx;
			font-weight: 600;
		}
		.qc {
			margin-top: 150rpx;
		}
	}
</style>